// 蓝色主题（默认主题）
$colorPrimary = rgb(9, 140, 194);
$colorPrimaryDeisabled = rgba(9, 140, 194, .4);

$lineColor = #ddd;

$colorSuccess = rgba(85, 181, 38, .8);
$colorSuccessHover = rgb(85, 181, 38);

.clearfix:after
  content: '';
  display: block;
  overflow: hidden;
  visibility: hidden;
  font-size: 0;
  line-height: 0;
  width: 0;
  height: 0;
  clear: both;

// 通用样式
.capricorncd-calendar-container, .capricorncd-date-detailed-settings
  *
    margin: 0;
    padding: 0;
  .bg-primary
    color: #fff;
    background-color: $colorPrimary;
    border-color: $colorPrimary;
  .bg-success
    color: #fff;
    background-color: $colorSuccess;
    border-color: $colorSuccess;
  .color-primary
    color: $colorPrimary;
  .color-success
    color: $colorSuccess;
  ._checkbox
    display: inline-block;
    margin: 0 2px 2px 0;
    padding: 0 8px;
    font-style: normal;
    float: left;
    min-width: 30px;
    height: 30px;
    text-align: center;
    line-height: 28px;
    cursor: pointer;
    box-sizing: border-box;
    border: 1px solid $lineColor;
    &._active
      border-color: $colorPrimary;
      color: #fff;
      background-color: $colorPrimary;
    &._disabled
      border-color: #eee;
      color: #fff;
      background-color: #eee;
      cursor: not-allowed;

//日历
.capricorncd-calendar-container
  margin: 0 auto;
  width: 100%;
  color: #333;
  font-size: 1em;
  background-color: #fff;
  .calendar-head-wrapper
    position: relative;
    height: 48px;
    background-color: rgb(9, 140, 194);
    .calendar-month-title
      text-align: center;
      font-size: 1em;
      line-height: 48px;
      color: #fff;
    a
      display: block;
      position: absolute;
      top: 0;
      z-index: 1;
      width: 48px;
      height: 48px;
      cursor: pointer;
      &:before
        display: inline-block;
        position: absolute;
        top: 15px;
        width: 11px;
        height: 17px;
        background-image: url('../img/arrow.png');
        background-repeat: no-repeat;
        overflow: hidden;
        content: '';
      &:hover
        opacity: .8;
      &.prev-month
        left: 0;
        &:before
          left: 17px;
          background-position: 0 0;
      &.next-month
        right: 0;
        &:before
          left: 19px;
          background-position: -12px 0;
  .calendar-table-wrapper
    table
      width: 100%;
      //border-collapse: collapse;
      border: none;
      .week
        background-color: rgba(9, 140, 194, .6);
        color: #fff;
        th
          width: 14.2%;
          line-height: 28px;
          font-weight: 100;
      td
        position: relative;
        vertical-align: top;
        height: 68px;
        background-color: #fff;
        border-bottom: 1px solid #eee;
        border-right: 1px solid #eee;
        &:last-child
          border-right: 0;
        &.disabled
          color: #ccc;
        b
          display: block;
          padding: 0 5px;
          text-align: right;
          line-height: 1.5;
        div
          box-sizing: border-box;
          color: rgb(9, 140, 194);
          font-size: 12px;
          p
            margin: 4px 0;
        	  padding: 0 5px;
        &.valid-hook:hover
          background-color: rgb(9, 140, 194);
          b, p
            color: #fff;

//日历/单日设置框页脚
.capricorncd-calendar-container .calendar-foot-wrapper,
.capricorncd-date-detailed-settings .cddsw-foot-wrapper
  height: 60px;
  text-align: right;
  button
    display: inline-block;
    margin: 15px 0 0 10px;
    min-width: 60px;
    height: 30px;
    text-align: center;
    cursor: pointer;
    outline: none;
    color: #fff;
    border: 1px solid #ccc;
    &.btn-cancel
      margin-right: 20px;
    &.btn-reset
      &:hover
        background-color: $colorSuccessHover;
        border-color: $colorSuccessHover;
    &.btn-batch
      border-color: $colorSuccess;
      &:hover
        background-color: $colorSuccessHover;
        border-color: $colorSuccessHover;
    &.btn-confirm
      background-color: rgb(9, 140, 194);
      border: 1px solid rgb(9, 140, 194);
      &:hover
        background-color: rgb(0, 100, 154);
        border-color: rgb(0, 100, 154);
    &.btn-cancel
      color: #999;
      &:hover
        color: #666;
        border-color: #bbb;

/*
 * 单独日期价格设置
 */
.capricorncd-date-detailed-settings
  display: flex;
  position: fixed;
  z-index: 99999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  background: url('../img/bg-black.png') repeat;
  background: rgba(0, 0, 0, .5);
  .cddsw-container
    width: 640px;
    position: relative;
    background-color: #FFF;
    font-size: 14px;
    .cddsw-head-wrapper
      height: 46px;
      line-height: 46px;
      position: relative;
      background: $colorPrimary;
      .cddsw-title
        color: #fff;
        margin-left: 20px;
        font-weight: 500;
      .cddsw-close
        display: block;
        position: absolute;
        z-index: 1;
        right: 0;
        top: 0;
        width: 46px;
        height: 46px;
        text-align: center;
        cursor: pointer;
        i
          display: inline-block;
          width: 24px;
          height: 24px;
          margin-top: 11px;
          background: url('../img/close.png') no-repeat 0 0;
          opacity: .6;
        &:hover
          i
            opacity: 1;
    .cddsw-form-wrapper
      padding-top: 20px;
      li
        position: relative;
        float: left;
        height: 31px;
        line-height: 31px;
        width: 49.9%;
        list-style: none;
        &:before
          display: table
          content: ''
        label
          display: block
          float left
          width 110px;
          padding: 0 10px 0 20px;
          text-align-last: justify;
          box-sizing border-box
        input
          display: block
          margin: 0 20px 0 110px;
          padding: 0 4px;
          min-height: 30px;
          line-height: 30px;
          border: 1px solid $lineColor;
          background: #fff;
          outline none
    .cddsw-batch-settings
      //margin-top: 10px;
      border-top: 1px solid $lineColor;
      border-left: 0;
      border-right: 0;
      border-bottom: 0;
      .bs-title
        margin-left: 15px;
        padding: 0 5px;
        height: 46px;
        line-height: 46px;
        font-size: 14px;
      .bs-content
        display: block;
        &:before
          display: table;
          content: '';
        .bs-lable
          float left
          width 110px
          text-align-last: justify;
          padding: 0 10px 0 20px;
          min-height: 32px;
          line-height: 32px;
          box-sizing border-box
        .bs-options-wrapper
          margin-left: 110px;
          min-height: 32px;
          line-height: 32px;
          .drw-enable
            margin-left: 10px;
          .itext
            padding: 0 4px;
            width: 40%;
            height: 30px;
            line-height: 30px;
            border: 1px solid $lineColor;
            background: #fff;
      .bs-week-chekbox
        margin-top: 15px;
      .bs-days-select
        margin-top: 14px;
        .bs-options-wrapper
          ._checkbox
            padding: 0;
            width: 32px;
      .disabled-options
        ._checkbox
          border-color: #eee;
          color: #fff;
          background-color: #eee;
          cursor: not-allowed;
          &._active
            border-color: $colorPrimaryDeisabled;
            background-color: $colorPrimaryDeisabled;

// ie浏览器
.capricorncd-date-detailed-settings.ie
  .cddsw-container
    position: absolute;
    left: 50%
    margin-left: -320px;
    width: 640px;

@media only screen and (max-width: 640px)
  .capricorncd-date-detailed-settings
    display: block;
    position: absolute;
    .cddsw-container
      width: 100%;
      .cddsw-form-wrapper
        li
          width: 100%;
      .cddsw-batch-settings
        .bs-content
          display: block;
          .bs-lable
            float inherit
            width 100%
            text-align-last auto
          .bs-options-wrapper
            margin-left: 20px;
            height: auto;
          .bs-options-wrapper
            label
              flex: 0 0 25%;
